<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一页</title>
</head>
<body>
    <h1>我是第一页</h1>
    <a href="./two.html">点我跳转到第二页</a>
    <button onclick="mygo()">历史前进1</button>
    <button onclick="myforward()">历史前进2</button>


    <script>
        // 前进1
        function mygo(){
            history.go(1);
        }
        // 前进2
        function myforward(){
            history.forward();
        }
    </script>
</body>
</html>